package ae.pcfc.cldos.online.common.clddb.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.hibernate.envers.Audited;

import ae.pcfc.cldos.online.common.domain.BaseEntity;

/**
 * Review Comments Entity
 * 
 * @author akhader
 *
 */

@Entity
@SequenceGenerator(name = "SQ_CLDOS_REVIEWCOMMENTS_ID", sequenceName = "SQ_CLDOS_REVIEWCOMMENTS_ID", initialValue = 1, allocationSize = 1)
@Audited
@Table(name = "T_CLDOS_REVIEW_COMMENTS")
public class ReviewComments extends BaseEntity implements Serializable{

	public static final String __APPLICATION_STATUS = "applicationStatus";
	
	public static final String __APP_ID = "applicationId";
	public static final String __DATE = "rcDate";
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -3958382668464014359L;
	
	@Id
	@GeneratedValue( strategy = GenerationType.SEQUENCE, generator="SQ_CLDOS_REVIEWCOMMENTS_ID")
	@Column(name = "RC_ID", nullable = false, precision = 30, scale = 0 )
	private Long rcId;
	
	
	@Column(name="RC_COMMENTS")
	private String rcComments;
	
	@Column(name="RC_USERNAME")
	private String rcUserName;
	
	@Column(name="RC_DATE")
	private Date rcDate;
	
	@Column(name="APPLICATION_ID")
	private Long applicationId;
	
	@Column(name="STATUS_CODE")
	private Long statusCode;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="APPLICATION_ID", referencedColumnName="APPLICATION_ID", insertable=false, updatable=false)
	private AppMetaData appMetaData;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="STATUS_CODE", referencedColumnName="STATUS_CODE", insertable=false, updatable=false)
	private ApplicationStatus applicationStatus;
	

	public Long getRcId() {
		return rcId;
	}

	public void setRcId(Long rcId) {
		this.rcId = rcId;
	}

	public String getRcComments() {
		return rcComments;
	}

	public void setRcComments(String rcComments) {
		this.rcComments = rcComments;
	}

	public String getRcUserName() {
		return rcUserName;
	}

	public void setRcUserName(String rcUserName) {
		this.rcUserName = rcUserName;
	}

	public Date getRcDate() {
		return rcDate;
	}

	public void setRcDate(Date rcDate) {
		this.rcDate = rcDate;
	}

	public Long getApplicationId() {
		return applicationId;
	}

	public void setApplicationId(Long applicationId) {
		this.applicationId = applicationId;
	}

	public Long getStatusCode() {
		return statusCode;
	}

	public void setStatusCode(Long statusCode) {
		this.statusCode = statusCode;
	}
	
	public AppMetaData getAppMetaData() {
		return appMetaData;
	}
	public void setAppMetaData(AppMetaData appMetaData) {
		this.appMetaData = appMetaData;
	}
	
	public ApplicationStatus getApplicationStatus() {
		return applicationStatus;
	}

	public void setApplicationStatus(ApplicationStatus applicationStatus) {
		this.applicationStatus = applicationStatus;
	}

	
}
